package org.dinnermate.staff;

import java.sql.SQLException;

import org.dinnermate.db.MapClass;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.ManyToMany;
import net.java.ao.Preload;
import net.java.ao.schema.TableName;

@TableName("Shift")
@Implementation(ShiftImpl.class)
@MapClass(ShiftToStaff.class)
@Preload()
public interface Shift extends Entity
{
	public long getDate();

	public void setDate( long date );

	public ShiftType getType();

	public void setType( ShiftType type );

	@ManyToMany(ShiftToStaff.class)
	public StaffMember[] getStaffMembers();
	
	public ShiftToStaff[] setStaffMembers( StaffMember[] staffMembers ) throws SQLException;
	
	public ShiftToStaff addStaffMember( StaffMember staffMember ) throws SQLException;
	
	public void deleteMaps() throws SQLException;
}
